<ion-view view-title="海外宝" >
    <ion-nav-buttons side="left">
        <back-button></back-button>
    </ion-nav-buttons>
    <ion-content ng-class="{'has-loading': isOffline}">

        <ion-refresher pulling-text={{PULLING_TEXT}} pulling-icon="" refreshing-text={{REFRESHING_TEXT}}
                       on-refresh="doRefresh()"></ion-refresher>

        <!-- promo -->
        <input type="hidden" ng-model="channel.channelId" value="1340" keep-current-value/>
        <input type="hidden" ng-model="channel.title" value=",SP500.SPI,990100.MI,122489.MI" keep-current-value/>
        <input type="hidden" ng-model="channel.adId" value="4614" keep-current-value/>

        <channel-img ng-click="showAds(true)"></channel-img>

        <div class="unlimited">

            <div class="landlord QDII-Top" ng-repeat="item in indexJson" ng-class="{on : item.isOpen}">
                <dl name="{{item.title}}" ng-click="openItem($index, true);">
                    <dt><img ng-src="{{item.titleImg}}" alt="{{item.name}}"></dt>
                    <dd><h2>{{item.name}}<span>{{item.description}}</span></h2>
                        <div class="increase">
                            <p>近一年涨幅<em ng-class="{inc_: item.rrInSingleYear < 0}">{{item.rrInSingleYear | defNumber:2}}%</em></p>
                            <p>近半年涨幅<em ng-class="{inc_: item.rrInSixMonth < 0}">{{item.rrInSixMonth | defNumber:2}}%</em></p>
                        </div>
                    </dd>
                </dl>
                <div class="retract" ng-click="openItem($index, false);">收起</div>
                <div class="chart">
                    <!--<div class="mask"></div>-->
                    <time id="{{item.title}}_date">指数走势更新日期：{{charts[item.title].date}}</time>
                    <highchart config="charts[item.title].config"></highchart>
                </div>
                <div class="related" id="{{item.channelId}}_contents">
                    <div class="hd">相关基金</div>

                    <a href="#/tab/product-item-QDII/{{fund.contentId}}" ng-repeat="fund in item.funds" >
                        <div class="item"><h3>{{fund.contentName}}</h3>
                            <p ng-if="fund.prodStatus!=4" class="increase">近一年涨幅<em ng-class="{inc_: fund.rrInSingleYear < 0}">{{fund.rrInSingleYear | defNumber : 2}}%</em></p>
                            <p ng-if="fund.prodStatus==4" class="increase">认购截止日<em >{{fund.ipoEndDate | defDateString}}</em></p>
                            <p>已售出<em>{{fund.prodRealScale | defNumber: 2}}亿份</em><br>起购金额<em>{{fund.prodMinSubscribe | prodMinSubscribe : 2}}</em></p>
                        </div>
                    </a>

                </div>
            </div>
        </div>
    </ion-content>
</ion-view>